import { CacheEnum } from "@/enum/userEnum"
import utils from "@/utils"
import { http } from "../plugins/axios"


//发送请求获取当天的签到的信息
function getSignInfo(){
    return http.request({
        url:'getSignInfo',
        method:'GET',
        headers: {token:utils.store.get(CacheEnum.TOKEN_NAME)},

    })
}



//存储当天的签到信息
function storeSignInfo(u_id:any,content:any){
     return http.request({
        url:'storeSignInfo',
        method:'get',
        params:{u_id:u_id,content:content},
        headers: {token:utils.store.get(CacheEnum.TOKEN_NAME)},
     })
}


//判断当天是否签到

function isSign(u_id:any){
    return http.request({
        url:'isSign',
        method:'get',
        params:{u_id:u_id},
        headers: {token:utils.store.get(CacheEnum.TOKEN_NAME)}
    })
}

//删除当天的当前用户的签到
function deletSign(u_id:any){
    return http.request({
        url:'deleteSign',
        method:'get',
        params:{u_id:u_id},
        headers: {token:utils.store.get(CacheEnum.TOKEN_NAME)}
    })
}
export default {getSignInfo,storeSignInfo,isSign,deletSign}